using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using VistaDB.Provider;

using NSimpleDB.Service.VistaDb;

namespace spike.SqlStatements
{
    class DBHelpers
    {
        public static DataTable GetItemNamesBySql(string dbFilename, string query)
        {
            using (VistaDBConnection conn = new VistaDBConnection("data source=" + dbFilename))
            {
                VistaDBDataAdapter adap = new VistaDBDataAdapter(query, conn);
                DataTable tb = new DataTable("QueryResult");
                adap.Fill(tb);
                return tb;
            }
        }
    }
}
